package com.caishi.lkx.exam.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.zzw.common.entity.impl.BSDIntEntity;
import com.zzw.common.service.model.RouterServiceModel;
import com.caishi.lkx.exam.ienum.type.QuestionCollectionType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.List;
import java.util.Map;


@Schema(title = "试题排行数据")
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
@TableName(value = "ex_exam_rank", autoResultMap = true)
public class ExamQuestionRank<T extends ExamQuestionRank<T>> extends BSDIntEntity<T> {

    @Schema(title = "科目id")
    private Long categoryId;

    @Schema(title = "考试id")
    private String examId;

    @Schema(title = "试题id")
    private String questionId;

    @Schema(title = "类型名称")
    private String type;

    @Schema(title = "试题签名")
    private String questionSign;

    @Schema(title = "题干")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<Map<String, Object>> stem;


    @Schema(title = "试题做题次数")
    private Long doCount;


    @Schema(title = "试题错题次数")
    private Long errorCount;


    @Schema(title = "试题收藏次数")
    private Long collectCount;

    @Schema(title = "集合对象id 仅章节和试卷")
    private String collectId;

    @Schema(title = "集合对象名称")
    private String collectName;

    @Schema(title = "集合对象类型")
    private QuestionCollectionType collectType;
    @TableName(value = "ex_exam_rank", autoResultMap = true)
    @Builder
    @Getter
    @Setter
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ExamQuestionRankBaseModel extends ExamQuestionRank<ExamQuestionRankBaseModel> implements RouterServiceModel {
        private String examId;
    }


    @TableName(value = "ex_question_rank_0", autoResultMap = true)
    public static class ExamQuestionRank0 extends ExamQuestionRank<ExamQuestionRank0> {
    }

    @TableName(value = "ex_question_rank_1", autoResultMap = true)
    public static class ExamQuestionRank1 extends ExamQuestionRank<ExamQuestionRank1> {
    }

    @TableName(value = "ex_question_rank_2", autoResultMap = true)
    public static class ExamQuestionRank2 extends ExamQuestionRank<ExamQuestionRank2> {
    }

    @TableName(value = "ex_question_rank_3", autoResultMap = true)
    public static class ExamQuestionRank3 extends ExamQuestionRank<ExamQuestionRank3> {
    }

    @TableName(value = "ex_question_rank_4", autoResultMap = true)
    public static class ExamQuestionRank4 extends ExamQuestionRank<ExamQuestionRank4> {
    }

    @TableName(value = "ex_question_rank_5", autoResultMap = true)
    public static class ExamQuestionRank5 extends ExamQuestionRank<ExamQuestionRank5> {
    }

    @TableName(value = "ex_question_rank_6", autoResultMap = true)
    public static class ExamQuestionRank6 extends ExamQuestionRank<ExamQuestionRank6> {
    }

    @TableName(value = "ex_question_rank_7", autoResultMap = true)
    public static class ExamQuestionRank7 extends ExamQuestionRank<ExamQuestionRank7> {
    }

    @TableName(value = "ex_question_rank_8", autoResultMap = true)
    public static class ExamQuestionRank8 extends ExamQuestionRank<ExamQuestionRank8> {
    }

    @TableName(value = "ex_question_rank_9", autoResultMap = true)
    public static class ExamQuestionRank9 extends ExamQuestionRank<ExamQuestionRank9> {
    }

    @TableName(value = "ex_question_rank_10", autoResultMap = true)
    public static class ExamQuestionRank10 extends ExamQuestionRank<ExamQuestionRank10> {
    }

    @TableName(value = "ex_question_rank_11", autoResultMap = true)
    public static class ExamQuestionRank11 extends ExamQuestionRank<ExamQuestionRank11> {
    }

    @TableName(value = "ex_question_rank_12", autoResultMap = true)
    public static class ExamQuestionRank12 extends ExamQuestionRank<ExamQuestionRank12> {
    }

    @TableName(value = "ex_question_rank_13", autoResultMap = true)
    public static class ExamQuestionRank13 extends ExamQuestionRank<ExamQuestionRank13> {
    }

    @TableName(value = "ex_question_rank_14", autoResultMap = true)
    public static class ExamQuestionRank14 extends ExamQuestionRank<ExamQuestionRank14> {
    }

    @TableName(value = "ex_question_rank_15", autoResultMap = true)
    public static class ExamQuestionRank15 extends ExamQuestionRank<ExamQuestionRank15> {
    }

    @TableName(value = "ex_question_rank_16", autoResultMap = true)
    public static class ExamQuestionRank16 extends ExamQuestionRank<ExamQuestionRank16> {
    }

    @TableName(value = "ex_question_rank_17", autoResultMap = true)
    public static class ExamQuestionRank17 extends ExamQuestionRank<ExamQuestionRank17> {
    }

    @TableName(value = "ex_question_rank_18", autoResultMap = true)
    public static class ExamQuestionRank18 extends ExamQuestionRank<ExamQuestionRank18> {
    }

    @TableName(value = "ex_question_rank_19", autoResultMap = true)
    public static class ExamQuestionRank19 extends ExamQuestionRank<ExamQuestionRank19> {
    }

    @TableName(value = "ex_question_rank_20", autoResultMap = true)
    public static class ExamQuestionRank20 extends ExamQuestionRank<ExamQuestionRank20> {
    }

    @TableName(value = "ex_question_rank_21", autoResultMap = true)
    public static class ExamQuestionRank21 extends ExamQuestionRank<ExamQuestionRank21> {
    }

    @TableName(value = "ex_question_rank_22", autoResultMap = true)
    public static class ExamQuestionRank22 extends ExamQuestionRank<ExamQuestionRank22> {
    }

    @TableName(value = "ex_question_rank_23", autoResultMap = true)
    public static class ExamQuestionRank23 extends ExamQuestionRank<ExamQuestionRank23> {
    }

    @TableName(value = "ex_question_rank_24", autoResultMap = true)
    public static class ExamQuestionRank24 extends ExamQuestionRank<ExamQuestionRank24> {
    }

    @TableName(value = "ex_question_rank_25", autoResultMap = true)
    public static class ExamQuestionRank25 extends ExamQuestionRank<ExamQuestionRank25> {
    }

    @TableName(value = "ex_question_rank_26", autoResultMap = true)
    public static class ExamQuestionRank26 extends ExamQuestionRank<ExamQuestionRank26> {
    }

    @TableName(value = "ex_question_rank_27", autoResultMap = true)
    public static class ExamQuestionRank27 extends ExamQuestionRank<ExamQuestionRank27> {
    }

    @TableName(value = "ex_question_rank_28", autoResultMap = true)
    public static class ExamQuestionRank28 extends ExamQuestionRank<ExamQuestionRank28> {
    }

    @TableName(value = "ex_question_rank_29", autoResultMap = true)
    public static class ExamQuestionRank29 extends ExamQuestionRank<ExamQuestionRank29> {
    }

    @TableName(value = "ex_question_rank_30", autoResultMap = true)
    public static class ExamQuestionRank30 extends ExamQuestionRank<ExamQuestionRank30> {
    }

    @TableName(value = "ex_question_rank_31", autoResultMap = true)
    public static class ExamQuestionRank31 extends ExamQuestionRank<ExamQuestionRank31> {
    }

}
